import requests
import pprint
url='https://game.gtimg.cn/images/lol/act/img/js/heroList/hero_list.js'
headers = {
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36'
    }
response=requests.get(url,headers=headers)
data=response.json()
data_list=data['hero']
skin_list1=[]
skin_name1=[]
for hero_data in data_list:
    hero_id=hero_data['heroId']
    hero_name=hero_data['name']
    hero_url='https://game.gtimg.cn/images/lol/act/img/js/hero/{}.js'.format(hero_id)
    response1 = requests.get(hero_url, headers=headers, )
    response1.encoding = response1.apparent_encoding
    data1 = response1.json()
    skin_list=data1['skins']
    for skin in skin_list:
        skin_name=skin['name']+'.jpg'
        skin_url=skin['mainImg']
        if skin_url!='':
            skin_list1.append(skin_url)
        skin_name1.append(skin_name)
        skin_name2=set(skin_name1)
        for i in skin_name2:
            print(i)

        # for s_n,skins1 in zip(skin_name2,skin_list1):
        #     print(s_n,skins1)

